package edu.gatech.cs2340.bytebankers.tests;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.util.List;
import java.util.Map;

import javax.swing.JPanel;

import org.junit.Test;

import edu.gatech.cs2340.bytebankers.config.InitialStartUpValues;
import edu.gatech.cs2340.bytebankers.model.Journey;
import edu.gatech.cs2340.bytebankers.model.Leader;
import edu.gatech.cs2340.bytebankers.model.Player;
import edu.gatech.cs2340.bytebankers.model.profession.Carpenter;
import edu.gatech.cs2340.bytebankers.presenter.IStartupPresenter;
import edu.gatech.cs2340.bytebankers.presenter.StartupPresenter;
import edu.gatech.cs2340.bytebankers.view.IStartupView;
import edu.gatech.cs2340.bytebankers.view.UIStartUpView;

/**
 * JUnit Test for StorePresenter.java. This tests to make sure that enum values
 * are working for players that are created.
 * 
 * @author Matt Anderson
 * 
 */
public class StartupPresenterTest {
    @Test
    public void testStartup() {

	Journey journey = new Journey();
	StartupPresenter presenter = new StartupPresenter(journey);
	Leader leader = new Leader();
	Carpenter carpenter = new Carpenter();

	leader.setProfession(carpenter);
	leader.setName("leader");
	
	Player player1 = new Player();
	player1.setName("Player 1");
	journey.addPlayer(player1);
	player1.setsickStatus("good");
	player1.setHealth(InitialStartUpValues.START_HEALTH);

	Player player2 = new Player();
	player2.setName("Player 2");
	journey.addPlayer(player2);
	player2.setsickStatus("ill");
	player2.setHealth(1);

	//presenter.onSaveForm();
	// IStartupPresenter presenter = new StartupPresenter(journey);
	UIStartUpView view = new UIStartUpView(presenter);

	assertEquals((int) 5000, (int) leader.getMoneyLeft());
	//assertEquals((int) 1, (int) player2.getHealth());

	//presenter.setView(view);

	//assertEquals("good", player1.getSickStatus());
	assertEquals((int) 10,(int) player1.getHealth());
	// assertEquals(1, journey.getPace());

    }
}